import datetime
from applications.extensions import db

class CategoryModel(db.Model):
    __tablename__ = 'spider_category'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment="分类的ID")
    name = db.Column(db.String(255), comment='分类名称')
    create_at = db.Column(db.DateTime, default=datetime.datetime.now, comment='创建时间')
    update_at = db.Column(db.DateTime, default=datetime.datetime.now, onupdate=datetime.datetime.now, comment='创建时间')